#include <bits/stdc++.h>
using namespace std;

const int N = 100010;
int a[N];
int temp[N];

void merge_sort(int q[], int l, int r)
{
    if (l >= r)
        return;
    int mid = l + r >> 1;
    // 二分递归
    merge_sort(q, l, mid);
    merge_sort(q, mid + 1, r);
    // 归并
    int i = l, j = mid + 1, k = l;
    while(i <= mid && j <= r)
    {
        if(q[i]<q[j])
            temp[k++]=q[i++];
        else
            temp[k++]=q[j++];
    }
    while(i <= mid) temp[k++]=q[i++]; //有剩下的直接接上去
    while(j <= r) temp[k++]=q[j++];   //同上
    for(int i = l; i <= r; i++) q[i] = temp[i];
}

int main()
{
    int n;

    scanf("%d", &n);
    for (int i = 0; i < n; i++)
        scanf("%d", &a[i]);
    merge_sort(a, 0, n - 1);
    for (int i = 0; i < n; i++)
        printf("%d ", a[i]);
    return 0;
}